<?php
if (!init()) {
  redirect('?action=login');
}

$delQuote = $_POST['delquote'];

$resultSet = editTopicComment($_POST['cid'], $delQuote, $_POST['content']);
$initiatorAction = \controller\ControllerUtil::getEncodedActionFromUrlWithParameters($_SERVER['HTTP_REFERER']) . "#comment" . $_POST['cid'];

if ($resultSet) {
  redirect("?action=msg&header=header.topic.comment.edit.success&body=body.topic.comment.edit.success&view=" . $initiatorAction);
} else {
  redirect("?action=msg&header=header.topic.comment.edit.failed&body=body.topic.comment.edit.failed&view=" . $initiatorAction);
}
